// import { createStore, applyMiddleware } from 'redux'
// import thunk from 'redux-thunk'; // redux的中间件,异步请求 一般和redux-saga二选一使用
// import reducer from './reducer';
// const store = createStore(reducer,applyMiddleware(thunk));

// export default store;

import { createStore, applyMiddleware } from 'redux'
import createSagaMiddleware from 'redux-saga'
import reducer from './reducer';
import mySaga from './sagas.js'
const sagaMiddleware = createSagaMiddleware()
const store = createStore(reducer,applyMiddleware(sagaMiddleware));
sagaMiddleware.run(mySaga)
export default store;